package com.authine.cloudpivot.ext.dto.voucher;

import com.authine.cloudpivot.ext.enums.kingdee.BusinessType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @Author: liwei
 * @DateTime: 2021/7/7
 * @Description: TODO
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Builder
@Schema(description = "凭证记录")
public class RecordVoucher {

    @Schema(description = "ID")
    private String id;

    @Schema(description = "凭证ID")
    private String voucher_id;

    @Schema(description = "对应业务ID")
    private String business_id;

    @Schema(description = "发票号码")
    private String invoice_no;

    @Schema(description = "账套名")
    private String account_name;

    @Schema(description = "业务类型")
    public String business_type;

    @Schema(description = "是否成功")
    private Boolean is_success;

    @Schema(description = "请求信息")
    private String request;

    @Schema(description = "返回信息")
    private String result;

    @Schema(description = "异常错误信息")
    private String error_message;

    @Schema(description = "交易创建时间")
    private Date createdTime;


    public RecordVoucher(String voucherId, String businessId, String number, String businessType, Boolean isSuccess, String request, String result, String errorMessage) {
        this.voucher_id = voucherId;
        this.business_id = businessId;
        this.invoice_no = number;
        this.business_type = businessType;
        this.is_success =  isSuccess;
        this.request = request;
        this.result = result;
        this.error_message = errorMessage;
    }
}
